package com.ruoyi.backStage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.backStage.mapper.DistanceAmountMapper;
import com.ruoyi.backStage.domain.DistanceAmount;
import com.ruoyi.backStage.service.IDistanceAmountService;

/**
 * 距离金额管理Service业务层处理
 * 
 * @author xingxing
 * @date 2023-07-04
 */
@Service
public class DistanceAmountServiceImpl implements IDistanceAmountService 
{
    @Autowired
    private DistanceAmountMapper distanceAmountMapper;

    /**
     * 查询距离金额管理
     * 
     * @param id 距离金额管理主键
     * @return 距离金额管理
     */
    @Override
    public DistanceAmount selectDistanceAmountById(Long id)
    {
        return distanceAmountMapper.selectDistanceAmountById(id);
    }

    /**
     * 查询距离金额管理列表
     * 
     * @param distanceAmount 距离金额管理
     * @return 距离金额管理
     */
    @Override
    public List<DistanceAmount> selectDistanceAmountList(DistanceAmount distanceAmount)
    {
        return distanceAmountMapper.selectDistanceAmountList(distanceAmount);
    }

    /**
     * 新增距离金额管理
     * 
     * @param distanceAmount 距离金额管理
     * @return 结果
     */
    @Override
    public int insertDistanceAmount(DistanceAmount distanceAmount)
    {
        return distanceAmountMapper.insertDistanceAmount(distanceAmount);
    }

    /**
     * 修改距离金额管理
     * 
     * @param distanceAmount 距离金额管理
     * @return 结果
     */
    @Override
    public int updateDistanceAmount(DistanceAmount distanceAmount)
    {
        return distanceAmountMapper.updateDistanceAmount(distanceAmount);
    }

    /**
     * 批量删除距离金额管理
     * 
     * @param ids 需要删除的距离金额管理主键
     * @return 结果
     */
    @Override
    public int deleteDistanceAmountByIds(Long[] ids)
    {
        return distanceAmountMapper.deleteDistanceAmountByIds(ids);
    }

    /**
     * 删除距离金额管理信息
     * 
     * @param id 距离金额管理主键
     * @return 结果
     */
    @Override
    public int deleteDistanceAmountById(Long id)
    {
        return distanceAmountMapper.deleteDistanceAmountById(id);
    }
}
